# encoding: UTF-8
 
class Level < ActiveRecord::Base

  has_many :guides

  attr_accessible :status, :title

  scope :open_status, where( :status => 0 )

	def self.level_guides
		@levels_with_guides = {}
		@levels = Level.all
		@levels.each do |x|
			@levels_with_guides[x.title] = Guide.level_with(x.title)
		end
		@levels_with_guides
	end

end
